/*
 * @Author: kongaobo tkfor@foxmail.com
 * @Date: 2024-02-22 09:43:28
 * @LastEditors: huyuhang
 * @LastEditTime: 2024-05-07 10:57:01
 * @FilePath: \asset-management-local\src\api\asset\taskManage\fileAnalysis.ts
 */
import request from '@/config/axios'
import { tableListType } from '@/types/table'
import { LocationQueryValue } from 'vue-router'
export const saveTask = async (data) => {
  return await request.postOriginal({ url: '/amp/asset-task/create-file', data })
}

export const editTask = async (data) => {
  return await request.postOriginal({ url: '/amp/asset-task/update-file', data })
}

interface fileListType extends tableListType {
  fileParseTaskId: LocationQueryValue | LocationQueryValue[]
}

export const getTaskDetail = async (params) => {
  return await request.get({ url: '/amp/asset-task/get-file', params })
}
export const getOverview = async (params) => {
  return await request.get({ url: '/amp/file-parse-result/overview', params })
}
export const addFileAsset = async (data) => {
  return await request.postOriginal({ url: '/amp/file-parse-result/add-file-asset', data })
}

export interface fileresultList {
  fileName?: string
  fileType?: string
  deptId?: string
  sysId?: string
  storageStatus?: string | number
  taskId?: string
}
export const getFileresultList = async (params: fileresultList & tableListType) => {
  return await request.getOriginal({ url: '/amp/file-parse-result/page', params })
}
